Show:

Streams relate Class

Lets the user search for streams they can relate a given stream to, and relate it

Constructor

Streams relate

(
  • [$options]
  • $publisherId
  • $streamName
  • [$communityId=Users::communityId()]
  • [$types=Q_Config::expect('Streams','relate','types')]
  • [$typeNames]
  • [options.multiple=true]
  • [$relateFrom=false]
  • [$types=Q_Config::expect('Streams','relate','types')]
)

Parameters:

  • [$options] Array optional

    Override various options for this tool

    • [onRelate] Q.Event optional

      This event handler occurs when a stream is successfully related

  • $publisherId String

    publisher id of the stream to relate

  • $streamName String

    name of stream to relate

  • [$communityId=Users::communityId()] String optional

    id of the user publishing the streams to relate to

  • [$types=Q_Config::expect('Streams','relate','types')] Array optional

    the types of streams the user can select

  • [$typeNames] Array optional

    pairs of array($type => $typeName) to override names of the types, which would otherwise be taken from the types

  • [options.multiple=true] Boolean optional

    whether the user can select multiple types for the lookup

  • [$relateFrom=false] Boolean optional

    if true, will relate FROM the user-selected stream TO the streamName instead

  • [$types=Q_Config::expect('Streams','relate','types')] String optional

    the types of streams the user can select

Item Index

Methods

Methods

register

(
  • $_REQUEST.fullName
  • $_REQUEST.identifier
  • [$_REQUEST.identifier.identifier]
  • [$_REQUEST.identifier.device]
  • [$_REQUEST.icon=array()]
)
static

Registers a user. Can be hooked to 'Users/register' before event so it can override standard functionality. Method ensures user registration based on full name and also handles registration of invited user

Parameters:

  • $_REQUEST.fullName String

    The full name of the user in the format 'First Last' or 'Last, First'

  • $_REQUEST.identifier String | Array

    Can be an email address or mobile number. Or it could be an array of $type => $info

  • [$_REQUEST.identifier.identifier] String optional

    an email address or phone number

  • [$_REQUEST.identifier.device] Array optional

    an array with keys "deviceId", "platform", "version" to store in the Users_Device table for sending notifications

  • [$_REQUEST.icon=array()] Array optional

    User icon